<template>
  <a-drawer
    title="详情"
    placement="right"
    width="40%"
    :visible="visible"
    :confirmLoading="confirmLoading"
    :destroyOnClose="true"
    @close="handleCancel"
  >
    <a-spin :spinning="confirmLoading">
      <v-table
        :table-column="columns"
        :data="loadData"
        bordered
        ref="table"
        style="margin-top:8px"
      >
      </v-table>
    </a-spin>
  </a-drawer>

</template>

<script>
import { signDetailsPage } from '@api/wfuSign/wfuSign'
export default {
  name: 'WfuAlarmDetail',
  components: {},
  data () {
    return {
      labelCol: {
        xs: { span: 24 },
        sm: { span: 7 }
      },
      wrapperCol: {
        xs: { span: 24 },
        sm: { span: 13 }
      },
      visible: false,
      confirmLoading: false,
      columns: [
        {
          title: '签到时间',
          field: 'checkTime'
        },
        {
          title: '签到地点',
          field: 'address'
        }
      ],
      queryParam: {
      },
      loadData: parameter => {
        return signDetailsPage(
          Object.assign(parameter, this.queryParam)
        ).then(res => {
          return res.data
        })
      }
    }
  },
  methods: {
    show (userCode, type) {
      this.visible = true
      this.confirmLoading = false
      this.queryParam.userCode = userCode
      this.queryParam.type = type
    },
    handleCancel () {
      this.visible = false
    }
  }
}
</script>

<style scoped>

</style>
